﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace CentralVacuum.Models
{
    /// <summary>
    /// 日志实体
    ///</summary>
    [SugarTable("Logs")] //数据库的表名称
    public class PLog
    {
        /// <summary>
        /// id 
        ///</summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }
        /// <summary>
        /// 日期时间 
        ///</summary>
        [SugarColumn(ColumnName = "dateLog")]
        public DateTime dateLog { get; set; }
        /// <summary>
        /// 设定重量 
        ///</summary>
        [SugarColumn(ColumnName = "setWeightLog")]
        public string setWeightLog { get; set; }
        /// <summary>
        /// 实际重量 
        ///</summary>
        [SugarColumn(ColumnName = "actWeightLog")]
        public string actWeightLog { get; set; }
        /// <summary>
        /// 设定密度 
        ///</summary>
        [SugarColumn(ColumnName = "setDensityLog")]
        public string setDensityLog { get; set; }
        /// <summary>
        /// 实际密度 
        ///</summary>
        [SugarColumn(ColumnName = "actDensityLog")]
        public string actDensityLog { get; set; }
        /// <summary>
        /// 加热时间 
        ///</summary>
        [SugarColumn(ColumnName = "heatTimeLog")]
        public string heatTimeLog { get; set; }
        /// <summary>
        /// 生产周期 
        ///</summary>
        [SugarColumn(ColumnName = "cycleLog")]
        public string cycleLog { get; set; }
        /// <summary>
        /// 管道压力 
        ///</summary>
        [SugarColumn(ColumnName = "phdPressLog")]
        public string phdPressLog { get; set; }
        /// <summary>
        /// 管道温度 
        ///</summary>
        [SugarColumn(ColumnName = "phdTempLog")]
        public string phdTempLog { get; set; }
        /// <summary>
        /// 桶顶压力 
        ///</summary>
        [SugarColumn(ColumnName = "topPressLog")]
        public string topPressLog { get; set; }
        /// <summary>
        /// 桶顶温度 
        ///</summary>
        [SugarColumn(ColumnName = "topTempLog")]
        public string topTempLog { get; set; }
        /// <summary>
        /// 主蒸汽压力 
        ///</summary>
        [SugarColumn(ColumnName = "steamPressLog")]
        public string steamPressLog { get; set; }
        /// <summary>
        /// 主空气压力 
        ///</summary>
        [SugarColumn(ColumnName = "airPressLog")]
        public string airPressLog { get; set; }
        /// <summary>
        /// 设备PN码 
        ///</summary>
        [SugarColumn(ColumnName = "pn")]
        public string pn { get; set; }

        public PLog()
        {
            dateLog = DateTime.Now;
            setWeightLog = "";
            actWeightLog = "";
            setDensityLog = "";
            actDensityLog = "";
            heatTimeLog = "";
            cycleLog = "";
            phdPressLog = "";
            phdTempLog = "";
            topPressLog = "";
            topTempLog = "";
            steamPressLog = "";
            airPressLog = "";
            pn = "";
        }

        /// <summary>
        /// 日志参数
        /// </summary>
        /// <param name="dateLog">日期</param>
        /// <param name="setWeightLog">设定重量</param>
        /// <param name="actWeightLog">入料重量</param>
        /// <param name="setDensityLog">设定密度</param>
        /// <param name="actDensityLog">实际密度</param>
        /// <param name="heatTimeLog">加热时间</param>
        /// <param name="cycleLog">生产周期</param>
        /// <param name="phdPressLog">管道压力</param>
        /// <param name="phdTempLog">PHD温度</param>
        /// <param name="topPressLog">桶顶压力</param>
        /// <param name="topTempLog">桶顶温度</param>
        /// <param name="steamPressLog">主蒸汽压力</param>
        /// <param name="airPressLog">空气压力</param>
        /// <param name="pn">设备pn码</param>
        public PLog(DateTime dateLog, string setWeightLog, string actWeightLog, string setDensityLog, string actDensityLog, string heatTimeLog, string cycleLog, string phdPressLog, string phdTempLog, string topPressLog, string topTempLog, string steamPressLog, string airPressLog, string pn)
        {
            this.dateLog = dateLog;
            this.setWeightLog = setWeightLog;
            this.actWeightLog = actWeightLog;
            this.setDensityLog = setDensityLog;
            this.actDensityLog = actDensityLog;
            this.heatTimeLog = heatTimeLog;
            this.cycleLog = cycleLog;
            this.phdPressLog = phdPressLog;
            this.phdTempLog = phdTempLog;
            this.topPressLog = topPressLog;
            this.topTempLog = topTempLog;
            this.steamPressLog = steamPressLog;
            this.airPressLog = airPressLog;
            this.pn = pn;
        }
    }
}
